﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tank
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            //this.Location = new Point(0, 0);

          
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            Graphics graphics = this.CreateGraphics();

            // Pen pen = new Pen(Color.Black);

            #region 怎样绘制线和字符串

            //绘制线
            //graphics.DrawLine(pen, new Point(0, 0), new Point(100, 100));

            //绘制字符串
            //graphics.DrawString("坦克大战",
            //new Font("隶书", 15),
            //new SolidBrush(Color.Red),
            //new Point(0, 0));
            #endregion

            Image image = Properties.Resources.Boss;

            Bitmap bm = Properties.Resources.Star1;
            bm.MakeTransparent(Color.Black);
            graphics.DrawImage(bm, new Point(100, 100));


            graphics.DrawImage(image, new Point(200, 200));

        }
    }
}
